//
//  LogCatContactHelper.h
//  LogCat
//
//  Created by 清风徐来 on 2024/1/8.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

// 定义一个回调类型
typedef void(^ContactsAccessCompletion)(BOOL accessGranted);

@interface LogCatContactHelper : NSObject

+ (LogCatContactHelper *)shared;

// 检查通讯录访问权限的方法，包含回调
- (void)checkContactsAccessWithCompletion:(ContactsAccessCompletion)completion;

// 获取通讯录并转换为JSON字符串
- (NSString *)fetchContactsAndConvertToJSON;

@end

NS_ASSUME_NONNULL_END
